<?php $this->Html->script('getCategory.js',array('inline'=>false));?>
<div class="row">
    <div class="col-md-3">
        <h2><kbd><?php echo __('Actions'); ?></kbd></h2>
        <hr/>
        <ul class="nav nav-stacked">

            <li><?php echo $this->Html->link(__('List Transactions'), array('action' => 'index')); ?></li>
            <li><?php echo $this->Html->link(__('List Categories'), array('controller' => 'categories', 'action' => 'index')); ?> </li>
            <li><?php echo $this->Html->link(__('New Category'), array('controller' => 'categories', 'action' => 'add')); ?> </li>
            <li><?php echo $this->Html->link(__('List Wallets'), array('controller' => 'wallets', 'action' => 'index')); ?> </li>
            <li><?php echo $this->Html->link(__('New Wallet'), array('controller' => 'wallets', 'action' => 'add')); ?> </li>
            <li><?php echo $this->Html->link(__('List Transactions'), array('controller' => 'transactions', 'action' => 'index')); ?> </li>
            <li><?php echo $this->Html->link(__('New Parent Transaction'), array('controller' => 'transactions', 'action' => 'add')); ?> </li>
        </ul>
    </div>
    <div class="transactions form col-md-9">
        <?php echo $this->Form->create('Transaction',array('class'=>'form-horizontal', 'inputDefaults'=>array('label'=>false))); ?>
        <fieldset>
            <h2><kbd><?php echo __('Add Transaction'); ?></kbd></h2>
            <hr/>
            <div class="form-group">
                <label for="type" class="col-sm-2 control-label">Type</label>
                <div class="col-sm-4">
                    <?php
                    $options = array('1'=>'Spent on','2'=>'Earn from');
                    echo $this->Form->input('type',array('class' => 'form-control','options'=>$options));?>
                </div>
            </div>
            <div class="form-group">
                <label for="category" class="col-sm-2 control-label">Category</label>
                <div class="col-sm-4">
                    <?php echo $this->Form->input('category_id',array('class' => 'form-control'));?>
                </div>
            </div>

            <div class="form-group">
                <label for="walletid" class="col-sm-2 control-label">Wallet</label>
                <div class="col-sm-4">
                    <?php echo $this->Form->input('wallet_id',array('class' => 'form-control'));?>
                </div>
            </div>
            <!--
          <div class="form-group">
            <label for="parent" class=" col-sm-2 control-label">Parent</label>
            <div class="col-sm-4">
               <?php// echo $this->Form->input('parent_id',array('class' => 'form-control','placeholder'=>'Parent...'));?>
            </div>
          </div>
          -->

            <div class="form-group">
                <label for="money" class=" col-sm-2 control-label">Money</label>
                <div class="col-sm-4">
                    <div class="input-group">
                        <input name="data[Transaction][money]" placeholder="Money ..." required="" class="form-control"  />
                        <span class="input-group-addon">VNĐ</span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="who" class=" col-sm-2 control-label">With Who</label>
                <div class="col-sm-4">
                    <?php echo $this->Form->input('with_who', array('class' => 'form-control','placeholder'=>'With Who ...'));?>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-4">
                    <?php echo $this->Form->Submit('Submit',array('class'=>'btn btn-danger col-sm-offset-4'));?>
                </div>
            </div>
        </fieldset>
        <?php echo $this->Form->end(); ?>
    </div>
</div>


